package org.opens.hutool.excel;

import cn.hutool.core.date.DateUtil;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
import org.junit.Test;
import org.opens.lambda.UserEntity;

import java.util.Date;
import java.util.List;

public class ExportExcel {

    @Test
    public void exportListToExcel() {
        List<UserEntity> list = UserEntity.getList(20);
        ExcelWriter writer = ExcelUtil.getWriter();
    }

    @Test
    public void test2() {
        Date date1 = new Date();
        Date date2 = new Date();

        String st1 = "2019-01-06";
        String st2 = "2019-01-07";

        date1 = DateUtil.parse(st1);
        date2 = DateUtil.parse(st2);

        System.out.println(date1);
        System.out.println(date2);
        System.out.println(date1.before(date2));
    }

    @Test
    public void test3() {

    }

}
